<template>
  <div class="card_wraper">
    <div class="card_title">
      <p class="orderId">订单号：{{ orderInfo.workOrderId }}</p>
      <p class="lsStatus">{{ switchStatus }}</p>
    </div>
    <div class="card_content">
      <van-icon name="location-o" />
      <p>{{ orderInfo.customerAddress }}</p>
    </div>
    <div class="card_content">
      <van-icon name="calendar-o" />
      <p>{{ orderInfo.lsCreateTime }}</p>
    </div>
  </div>
</template>
<script>
import { status } from '@/utils/tools'

export default {
  name: 'sCard',
  props: ['orderInfo'],
  computed: {
    switchStatus() {
      const num = this.orderInfo.lsStatus
      return status(num)
    }
  }
}
</script>
<style lang="less" scoped>
.card_wraper {
  background: @gray-1;
  text-align: left;
  margin-top: 10px;
  padding: 15px;
  border-radius: 4px;
  .card_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    .orderId {
      color: @black;
      font-weight: 500;
    }
    .lsStatus {
      font-size: @font-size-sm;
      color: @main-color;
      font-weight: 500;
    }
  }
  .card_content {
    display: flex;
    align-items: center;
    font-size: @font-size-sm;
    line-height: 1.5em;
    p {
      padding-left: 6px;
    }
  }
}
</style>
